- reporter = abuse_report.reporter
- user = abuse_report.user
%tr
  %td
    - if user
      = link_to user.name, [:admin, user]
      .light.small
        加入时间：#{time_ago_with_tooltip(user.created_at)}
    - else
      (已删除)
  %td
    - if reporter
      = link_to reporter.name, [:admin, reporter]
    - else
      (已删除)
    .light.small
      = time_ago_with_tooltip(abuse_report.created_at)
  %td
    = markdown(abuse_report.message.squish!, pipeline: :single_line)
  %td
    - if user
      = link_to '删除用户和举报', admin_abuse_report_path(abuse_report, remove_user: true),
        data: { confirm: "确定要删除 #{user.name} 用户么？" }, remote: true, method: :delete, class: "btn btn-xs btn-remove js-remove-tr"

  %td
    - if user && !user.blocked?
      = link_to '禁用用户', block_admin_user_path(user), data: {confirm: '确定要禁用用户么？'}, method: :put, class: "btn btn-xs"
    - else
      .btn.btn-xs.disabled
        已被禁用
    = link_to '删除举报', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"
